use redb_derive::Value;
use serde::{Deserialize, Serialize};

#[derive(Value, Deserialize, Serialize, Debug, PartialEq, Clone)]
pub struct MinecraftProfile {
    pub name: String,
    pub uuid: String,
    pub access_token: String,
    pub refresh_token: String,
    pub is_online: bool,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct VersionManifest {
    pub latest: Latest,
    pub versions: Vec<Version>,
}

#[derive(Deserialize, Serialize, Debug)]
pub struct Latest {
    pub release: String,
    pub snapshot: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct Version {
    pub id: String,
    #[serde(alias = "type")]
    pub type_: String,
    pub url: String,
    pub time: String,
    #[serde(alias = "releaseTime")]
    pub release_time: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct LibDownloadInfo {
    pub downloads: Downloads,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct Downloads {
    pub artifact: Artifact,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct TrueVersionManifest {
    pub libraries: Vec<LibDownloadInfo>,
    pub assetIndex: AssetIndex
}
#[derive(Deserialize, Serialize, Debug)]
pub struct AssetIndex {
    pub id: String,
    pub sha1: String,
    pub url: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct Artifact {
    pub path: String,
    pub sha1: String,
    pub size: u64,
    pub url: String,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct ClientJar {
    pub sha1: String,
    pub url: String,
}
